package net.lainiao.morethread.Chapter3.demo4;

/**
 * Created by Administrator on 2017/3/1.
 */
public class Grouper implements Runnable {
    private Result result;

    public Grouper(Result result) {
        this.result = result;
    }

    @Override
    public void run() {
        int finalResult=0;
        System.out.println("正在合并结果");
        int data[]=result.getData();
        for(int number:data){
            finalResult+=number;
        }
        System.out.println("Grouper合并后的结果是查到"+finalResult+"个数字");
    }
}
